home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0429.dms / q0429.adf / libshade / Makefile.SH < prev    next >
Makefile  |  1991-08-08  |  3KB  |  129 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . config.sh
  10.     ;;
  11. esac
  12. : This forces SH files to create target in same directory as SH file.
  13. : This is so that make depend always knows where to find SH derivatives.
  14. case "$0" in
  15. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  16. esac
  17. echo "Extracting Makefile (with variable substitutions)"
  18. : This section of the file will have variable substitutions done on it.
  19. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  20. : Protect any dollar signs and backticks that you do not want interpreted
  21. : by putting a backslash in front.  You may delete these comments.
  22. $spitshell >Makefile <<!GROK!THIS!
  23. #
  24. # Makefile for rayshade.
  25. #
  26. # Craig Kolb
  27. #
  28. # \$Id: Makefile.SH,v 4.0 91/07/17 14:44:47 kolb Exp Locker: kolb $
  29. #
  30. # Bin directory
  31. #
  32. BINDIR = $bin 
  33. #
  34. # If you are using LINDA, add -DLINDA
  35. # If you are running on a Multimax, add -DMULTIMAX -DSHAREDMEM
  36. # Be sure to add any necessary floating point hardware switches.
  37. OPTIMIZE = $optimize
  38. URTINC = $urtinc
  39. CCFLAGS = $ccflags $large
  40. CC = $cc
  41. MKDEP = $mkdep
  42. YACC = $yacc
  43. RANLIB = $ranlib
  44.  
  45. !GROK!THIS!
  46.  
  47. : In the following dollars and backticks do not need the extra backslash.
  48. $spitshell >>Makefile <<'!NO!SUBS!'
  49. LIBRAYDIR = ../libray
  50. INCLUDE = -I.. -I$(LIBRAYDIR)
  51. YFLAGS = -d
  52.  
  53. CFLAGS = $(CCFLAGS) $(URTINC) $(INCLUDE) $(OPTIMIZE)
  54. SHELL = /bin/sh
  55.  
  56. LIB = libshade.a
  57.  
  58. SUPPORT_C =    builtin.c symtab.c misc.c lightdef.c objdef.c options.c \
  59.         stats.c surfdef.c
  60.  
  61. SUPPORT_H =    ../config.h datatypes.h funcdefs.h \
  62.         ../patchlevel.h rayshade.h
  63.  
  64. PARSE_C =    yacc.c lex.c
  65.  
  66. DRIVE_C =    setup.c viewing.c shade.c picture.c
  67.  
  68. DRIVE_H =    y.tab.h defaults.h viewing.h raytrace.h picture.h
  69.  
  70. SUPPORT_O = $(SUPPORT_C:.c=.o)
  71.  
  72. PARSE_O = $(PARSE_C:.c=.o)
  73.  
  74. DRIVE_O = $(DRIVE_C:.c=.o)
  75.  
  76. HFILES = $(DRIVE_H) $(SUPPORT_H)
  77.  
  78. CFILES = $(DRIVE_C) $(PARSE_C) $(SUPPORT_C)
  79.  
  80. SHFILES = Makefile.SH
  81.  
  82. OFILES = $(DRIVE_O) $(PARSE_O) $(SUPPORT_O)
  83.  
  84. DEPENDSRC = $(DRIVE_C) lex.l yacc.y $(SUPPORT_C)
  85.  
  86. $(LIB): $(OFILES)
  87.     ar cur $(LIB) $(OFILES)
  88.     $(RANLIB) $(LIB)
  89.  
  90. #
  91. # Uncomment the following rule if using Linda.
  92. #
  93. #raytrace.lo: raytrace.cl
  94. #    $(LCC) $(CFLAGS) -c raytrace.cl
  95.  
  96. #
  97. # End of configuration section
  98. #
  99. install:    rayshade
  100.         mv rayshade $(BINDIR)/rayshade
  101.  
  102. clean:
  103.     rm -f $(OFILES) core libshade.a
  104.  
  105. realclean:
  106.     rm -f $(OFILES) core libshade.a y.tab.h
  107.     rm -f *.orig Makefile
  108.  
  109. lint:
  110.     lint $(CFLAGS) -x $(CFILES) -lm
  111.  
  112. tags:
  113.     ctags -t $(CFILES)
  114.  
  115. depend:
  116.     (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  117.      $(MKDEP) $(DEPENDSRC) | sed 's/: \.\//: /; /\/usr\/include/d' \
  118.     ) >Makefile.new
  119.     cp Makefile Makefile.bak
  120.     cp Makefile.new Makefile
  121.     rm -f Makefile.new
  122.  
  123.  
  124. # DO NOT DELETE THIS LINE
  125. !NO!SUBS!
  126. chmod 755 Makefile
  127. $eunicefix Makefile
  128.